package com.cxs.plan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cxs.plan.domain.entity.Budget;
import org.apache.ibatis.annotations.Param;

/**
* @author Administrator
* @description 针对表【budget(每月预算)】的数据库操作Mapper
* @createDate 2024-05-09 17:24:05
* @Entity com.cxs.plan.domain.entity.Budget
*/
public interface BudgetMapper extends BaseMapper<Budget> {
    Budget selectUserBudget(@Param("year") String year, @Param("currentId") Integer currentId);

    void insertBudget(Budget budget);

    Integer selectMonthSurplusBudget(@Param("userId") Integer userId, @Param("year") int year, @Param("monthKey") String monthKey);


    Integer selectMonthBudget(@Param("userId") Integer userId, @Param("year") int year, @Param("monthKey") String monthKey);
    void updateBudgetById(Budget budget);
}




